<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class StudentActionSituation extends Validate
{
    protected $rule = ['student_id' => 'require|number','situation_name' => 'require','situation_detail' => 'require','add_time' => 'require|number',
    ];

    protected $message = ['student_id.require' => '班级ID为必填项','student_id.number' => '班级ID需为数字','situation_name.require' => '情况名称为必填项','situation_detail.require' => '情况详情为必填项','add_time.require' => '发布时间为必填项','add_time.number' => '发布时间需为数字',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['student_id','situation_name','situation_detail','add_time',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['student_id','situation_name','situation_detail','add_time',]);
    }
}
